// import React from 'react';
import React, { Suspense, lazy } from 'react';


// import { BrowserRouter as Router, Route, Switch, Link } from 'react-router-dom';
import { HashRouter as Router, Route, Switch, Link } from 'react-router-dom';

// import Login from './pages/Login';
// import Home from './pages/Home';

const One = lazy(() => import('./pages/One'));
const Two = lazy(() => import('./pages/Two'));
const Three = lazy(() => import('./pages/Three'));
const Four = lazy(() => import('./pages/Four'));
const Five = lazy(() => import('./pages/Five'));
const Six = lazy(() => import('./pages/Six'));
const Seven = lazy(() => import('./pages/Seven'));
const Eight = lazy(() => import('./pages/Eight'));
const Ten = lazy(() => import('./pages/Ten'));



const AppRouter = () => (
    <Router>

        <Suspense fallback={<div className="loginMask">正在拼命加载...</div>}>
            <div>
                <ul>
                    <li><Link to="/One">One</Link></li>
                    <li><Link to="/Two">Two</Link></li>
                    <li><Link to="/Three">Three</Link></li>
                    <li><Link to="/Four">Four</Link></li>
                    <li><Link to="/Five">Five</Link></li>
                    <li><Link to="/Six">Six</Link></li>
                    <li><Link to="/Seven">Seven</Link></li>
                    <li><Link to="/Eight">Eight</Link></li>
                    <li><Link to="/Ten">Ten</Link></li>
                </ul>
                <Switch>
                    <Route exact path="/One" component={One} />
                    <Route path="/Two" component={Two} />
                    <Route path="/Three" component={Three} />
                    <Route path="/Four" component={Four} />
                    <Route path="/Five" component={Five} />
                    <Route path="/Six" component={Six} />
                    <Route path="/Seven" component={Seven} />
                    <Route path="/Eight" component={Eight} />
                    <Route path="/Ten" component={Ten} />
                </Switch>
            </div>
        </Suspense>
    </Router>
);

export default AppRouter;